package day6;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr8 {
    public static void main(String[] args) {
        int []ar={1,2,22,55,23,14,233,6,66,145,10,16};
        String s = Arrays.toString(ar);
        System.out.println(s);
        Arrays.sort(ar);//排序
        System.out.println(Arrays.toString(ar));
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>");
        int k=515;
        int pos = Arrays.binarySearch(ar, k);//位置
        if(pos<0){
            System.out.println("不在！");
        }else{
            System.out.println("Zai shuzu 的"+pos+"位置！");
        }
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>");
        int []a2=new int[10];
        Arrays.fill(a2,250);
        System.out.println(Arrays.toString(a2));
    }
}
